import { EntityModel } from '@midwayjs/orm';
import { Column } from 'typeorm';
import { BaseEntity } from '@cool-midway/core';

/**
 * 页面
 */
@EntityModel('page_list')
export class PageListEntity extends BaseEntity {
  @Column({ comment: '名称', type: 'varchar', nullable: true })
  name: string;

  @Column({
    comment: '页面类型：PRODUCT MAGIC CATEGORY...',
    name: 'page_type',
    type: 'varchar',
    nullable: true,
  })
  pageType: string;
  @Column({
    comment: '路由类型：TABBAR ，PAGES',
    name: 'route_type',
    type: 'varchar',
    nullable: true,
  })
  routeType: string;

  @Column({ comment: '页面路径', type: 'varchar', nullable: true })
  path: string;

  @Column({ comment: '参数', type: 'varchar', nullable: true, default: '{}' })
  param: string;

  @Column({ comment: '索引', type: 'tinyint', nullable: true })
  index: number;

  @Column({ comment: 'extend', nullable: true })
  extend: number;

  @Column({
    comment: '启用0：未启用，1：启用',
    type: 'tinyint',
    default: 1,
    nullable: true,
  })
  status: number;
}
